package com.cabal.job;

import com.cabal.clear.service.ClearSomeDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Slf4j
public class ClearSomeDataJob {

    @Resource
    private ClearSomeDataService clearSomeDataService;

    @Scheduled(cron="0 0 1 * * ?")
    public void clearSomeData() {
        log.info("清理数据定时任务开始......");
        clearSomeDataService.clearSomeData();
        log.info("清理数据定时任务结束......");
    }
}
